package it.fuesi.expired.model.base;

public class ErrorModel extends AModel {

	private Throwable ex;
	
	public static ErrorModel factory(Throwable ex) {
		final ErrorModel error = new ErrorModel();
		error.setSuccess(false);
		error.ex = ex;
		return error;
	}
	
	
	@Override
	public String getMsg() {
		return ex != null ? ex.getMessage() : super.getMsg();
	}

}
